﻿// JavaScript Document
var oldRowBGColor = null;
function GridView_selectRow(row)
{
    var theRow = null;
    var bLastSel = false;
    for (var i = 1; i < document.all.GridView1.rows.length; i++)
    {
        theRow = document.all.GridView1.rows[i];
        if (theRow != null) {
        	var strclr = theRow.style.backgroundColor.toLowerCase();
        	if (strclr == '#c3b9bc' || strclr == 'rgb(195, 185, 188)') {
                if(oldRowBGColor != null){
                    theRow.style.backgroundColor = oldRowBGColor;
                    bLastSel = true;
                    oldRowBGColor = null;
                    break;
                }
            }
        }
    }
    if(theRow == row && bLastSel)   return;
    oldRowBGColor = row.style.backgroundColor;
    row.style.backgroundColor = '#c3b9bc';
}
